Page({
  data: {
    point: '', // 小区
    size: 0, // 3-6
    type: '', // 3-4 号楼, 5-6 单元
  },
  onLoad({ point }) {
    // 造假数据
    this.fake(point)
  },
  fake(point) {
    // 楼栋的数量在3-6之间, 3-4 号楼, 5-6 单元
    const size = Math.floor(Math.random() * 4) + 3
    const type = size > 4 ? '单元' : '号楼'
    this.setData({
      point,
      size,
      type,
    })
  },
  goRoom(e) {
    const { point } = this.data
    wx.navigateTo({
      url: `/house_pkg/pages/room/index?point=${point}&building=${e.mark.building}`,
    })
  },
})
